package com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.work;

import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.work.dto.BusinessEmployeeWorkExperienceListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.work.param.BusinessEmployeeWorkExperienceCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.work.param.BusinessEmployeeWorkExperienceDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.work.param.BusinessEmployeeWorkExperienceListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.work.param.BusinessEmployeeWorkExperienceUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 员工工作经历
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】Employee Work Experience Management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessEmployeeWorkExperienceCloudServiceFallback.class)
@RequestMapping("/business/employee/work/experience")
public interface BusinessEmployeeWorkExperienceCloudService {

    // 查询员工工作经历列表
    @ApiOperation(value = "Query Employee Work Experience List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.work.BusinessEmployeeWorkExperienceCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessEmployeeWorkExperienceListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Employee Work Experience List", dataType = "BusinessEmployeeWorkExperienceListCloudParam", dataTypeClass = BusinessEmployeeWorkExperienceListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessEmployeeWorkExperienceListCloudDto list(BusinessEmployeeWorkExperienceListCloudParam param);

    // 创建员工工作经历
    @ApiOperation(value = "Create Employee Work Experience", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.work.BusinessEmployeeWorkExperienceCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create Employee Work Experience", dataType = "BusinessEmployeeWorkExperienceCreateCloudParam", dataTypeClass = BusinessEmployeeWorkExperienceCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessEmployeeWorkExperienceCreateCloudParam param);


    // 编辑员工工作经历
    @ApiOperation(value = "Update Employee Work Experience", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.work.BusinessEmployeeWorkExperienceCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update Employee Work Experience", dataType = "BusinessEmployeeWorkExperienceUpdateCloudParam", dataTypeClass = BusinessEmployeeWorkExperienceUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessEmployeeWorkExperienceUpdateCloudParam param);


    // 删除员工工作经历
    @ApiOperation(value = "Delete Employee Work Experience", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.work.BusinessEmployeeWorkExperienceCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete Employee Work Experience", dataType = "BusinessEmployeeWorkExperienceDeleteCloudParam", dataTypeClass = BusinessEmployeeWorkExperienceDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(BusinessEmployeeWorkExperienceDeleteCloudParam param);

}
